package com.yangy.flvdemo.ffmpeg;

import java.util.HashMap;
import java.util.Map;

/**
 *
 * 缓存开启的视频推流数据
 *
 * @author YangYuan
 * @date 2024/7/4
 */
public class VideoStreamerBucket {

    public static Map<String, RTSPToFLVStreamer> flvStreamerMap = new HashMap<>(20);

    /**
     * 判断是否，开启流推送
     * @param key
     * @return
     */
    public static boolean isActive(String key){
        return flvStreamerMap.containsKey(key);
    }

    public static void removeStreamer(String key){
        flvStreamerMap.remove(key);
    }

    public static void put(String key, RTSPToFLVStreamer streamer){
        flvStreamerMap.put(key, streamer);
    }

}
